﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Master.Master"
    Inherits="System.Web.Mvc.ViewPage<List<ProductExtendEntity>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("StepByStep"); %>
    <%= Html.Hidden("ProductId",ViewData["ProductId"]) %>
    <form id="frm1" action="" method="post">
    <%= Html.Hidden("ProductId",ViewData["ProductId"]) %>
    <table id="table1" class="gv">
        <thead>
            <tr>
                <td colspan="4" class="textCenter font14 fontBold">
                    如果你的产品有大部分属性相同，只有小部分，例如：颜色，尺码不同，可以使用本功能
                </td>
            </tr>
            <tr class="fontBold title">
                <td class="textCenter width160">
                    属性名称
                </td>
                <td class="textCenter width60">
                    排序
                </td>
                <td class="width160">
                    属性值
                </td>
                <%--   
                <td class="width160">
                    图示
                </td>
                --%>
                <td>
                    操作
                </td>
            </tr>
        </thead>
        <tbody>
            <% foreach (ProductExtendEntity item in Model)
               {
            %>
            <tr class="textCenter">
                <td>
                    <%= Html.TextBox("ExtendKey" , item.ExtendKey , new { id=Guid.NewGuid(),@class="width150"})%>
                </td>
                <td>
                    <%= Html.TextBox("Sequence" , item.Sequence , new { @class = "width50",id =  Guid.NewGuid() })%>
                </td>
                <td>
                    <%= Html.TextBox("ExtendValue" , item.ExtendValue , new { id = Guid.NewGuid() , @class="width150"})%>
                </td>
                <%--
                <td>
                    <%= Html.TextBox("ExtendIcon" , item.ExtendIcon , new { id = Guid.NewGuid() , @class = "width150" , style = "cursor:pointer;" })%>
                </td>
                --%>
                <td class="textLeft">
                    <%= Html.Hidden("ExtendId" , item.ExtendId , new { id=Guid.NewGuid()})%>
                    <input type="button" value="删除" name="btnDelete" />
                    <input type="submit" value="保存" />
                </td>
            </tr>
            <%
               }
            %>
        </tbody>
        <tfoot>
            <tr>
                <td>
                </td>
                <td colspan="3">
                    <input type="button" value="增加属性" id="btnInsert" />
                    <input type="submit" value="保存" />
                </td>
            </tr>
        </tfoot>
    </table>
    </form>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cssLink" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="JsLink" runat="server">
    <script src="<%=Url.Content("~/Scripts/Manage/Product.Optional.js") %>" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cssContent" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="jsContent" runat="server">
    <script type="text/javascript">
        $(function () {
            ExtendProperty.DeleteUrl = '<%=Url.Action("DeleteOptional") %>';
            ExtendProperty.Init();
        });
    </script>
</asp:Content>
